#include <unistd.h>     // usleep()
#include <iostream>

#include "progbar.h"

#define RANGE_LEN       60
#define DELAY_TIME      200000

int main()
{
    CProgBar<long long> pb;
    pb.setRange(RANGE_LEN);

    pb.setStyle(PROG_NUM_STYLE);
    pb.init();
    for(long long i = 0; i <= RANGE_LEN; ++i)
    {
        pb.setpos(i);
        usleep(DELAY_TIME);
    }
    std::cout << std::endl;

    pb.setStyle(PROG_CHR_STYLE);
    pb.init();
    for(long long i = 0; i <= RANGE_LEN; ++i)
    {
        pb.setpos(i);
        usleep(DELAY_TIME);
    }
    std::cout << std::endl;

    pb.setStyle(PROG_BGC_STYLE);
    pb.init();
    for(long long i = 0; i <= RANGE_LEN; ++i)
    {
        pb.setpos(i);
        usleep(DELAY_TIME);
    }
    std::cout << std::endl;

    return 0;
}
